package com.ruoyi.business.service.impl;

import java.util.List;

import com.ruoyi.business.mapper.RefundApprovalMapper;
import com.ruoyi.business.service.IRefundApprovalService;
import com.ruoyi.common.core.domain.entity.RefundApproval;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;


/**
 * 退款审批记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-07
 */
@Service
public class RefundApprovalServiceImpl implements IRefundApprovalService
{
    @Autowired
    private RefundApprovalMapper refundApprovalMapper;

    /**
     * 查询退款审批记录
     *
     * @param refundApprovalId 退款审批记录主键
     * @return 退款审批记录
     */
    @Override
    public RefundApproval selectRefundApprovalByRefundApprovalId(Long refundApprovalId)
    {
        return refundApprovalMapper.selectRefundApprovalByRefundApprovalId(refundApprovalId);
    }

    /**
     * 查询退款审批记录列表
     *
     * @param refundApproval 退款审批记录
     * @return 退款审批记录
     */
    @Override
    public List<RefundApproval> selectRefundApprovalList(RefundApproval refundApproval)
    {
        return refundApprovalMapper.selectRefundApprovalList(refundApproval);
    }

    /**
     * 新增退款审批记录
     *
     * @param refundApproval 退款审批记录
     * @return 结果
     */
    @Override
    public int insertRefundApproval(RefundApproval refundApproval)
    {
        return refundApprovalMapper.insertRefundApproval(refundApproval);
    }

    /**
     * 修改退款审批记录
     *
     * @param refundApproval 退款审批记录
     * @return 结果
     */
    @Override
    public int updateRefundApproval(RefundApproval refundApproval)
    {
        return refundApprovalMapper.updateRefundApproval(refundApproval);
    }

    /**
     * 批量删除退款审批记录
     *
     * @param refundApprovalIds 需要删除的退款审批记录主键
     * @return 结果
     */
    @Override
    public int deleteRefundApprovalByRefundApprovalIds(Long[] refundApprovalIds)
    {
        return refundApprovalMapper.deleteRefundApprovalByRefundApprovalIds(refundApprovalIds);
    }

    /**
     * 删除退款审批记录信息
     *
     * @param refundApprovalId 退款审批记录主键
     * @return 结果
     */
    @Override
    public int deleteRefundApprovalByRefundApprovalId(Long refundApprovalId)
    {
        return refundApprovalMapper.deleteRefundApprovalByRefundApprovalId(refundApprovalId);
    }
}
